<template>
  <div>
    <div class="header">
      <div class="header-left">
        <span class="iconfont iconfont-back">&#58916;</span>
      </div>
      <div class="header-input">
        <span class="iconfont iconfont-search">&#58930;</span>
        输入城市/景点/游玩主题</div>
          <router-link to="/city">
          <div class="header-right">
          {{this.city}}
          <span class="iconfont iconfont-bottom">&#58954;</span>
          </div>
        </router-link>
    </div>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'HomeHeader',
  data () {
    return {

    }
  },
  methods: {

  },
  components: {

  },
  computed: {
    ...mapState(['city'])
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/varibles.styl'
  .header
    line-height: $headerHeight
    background-color: $bgColor
    color: #fff
    display: flex
    .header-left
      width: .64rem
      float: left
      .iconfont-back
        margin-left: .2rem
    .header-input
      flex: 1
      margin-top: .12rem
      margin-left: .2rem
      line-height: .64rem
      height: .64rem
      border-radius: .1rem
      background-color: #ffffff
      color: #ccc
      .iconfont-search
        padding-left: .2rem
    .header-right
      min-width: 1.04rem
      padding: .1rem
      float: right
      text-align: center
      color #fff
      .iconfont-bottom
        margin-left: -.04rem
        font-size: .24rem
</style>
